package com.keepsport.keepsportapi.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.keepsport.keepsportapi.dto.MallCartDto;
import com.keepsport.keepsportapi.entity.MallCart;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * __▁▂▃▁__ ﹀ 　　 落霞与孤骛齐飞
 * 　　﹀ _▁▂▃__ 　　 秋水共长天一色
 * 　　__▁▂▁___ ﹀ ﹋ ●
 * 　　﹋ ﹀
 * 　　█▆▅▇▆▅▄▃▄▅▆▄▅▄▃▂▃▄▆▅▇▆▄▅█
 * 　　-__~~--___-▔~~__--__~~~_----__----~~~-
 *
 * @author 1212
 * @create 2022-07-02 19:52
 */
public interface MallCartDao extends BaseMapper<MallCart> {
   @Select("select tm.name,tm.img,tm.discount,tu.id,tc.nub ,tc.sid from t_user tu inner join t_mall_cart tc on tu.id = tc.uid inner join t_mall tm on tm.id=tc.mid where tu.id=#{token}")
    List<MallCartDto> selectByUser(int token);
   //添加商品

}
